unit uWVConstants;

{$IFDEF FPC}{$MODE Delphi}{$ENDIF}

interface

const
  {$I uWVVersion.inc}

  CRLF = #13 + #10;

  {$IF NOT DECLARED(USER_DEFAULT_SCREEN_DPI)}
  USER_DEFAULT_SCREEN_DPI = 96;
  {$IFEND}

  {*
   These constants are declared in the "Windows" unit but
   some old Delphi versions don't have them.
   We have to add "WV2_" to be compatible with C++ Builder.
  *}
  WV2_IMAGE_FILE_MACHINE_I386  = $014C;
  WV2_IMAGE_FILE_MACHINE_AMD64 = $8664;

  ZOOM_STEP_25  = 0;
  ZOOM_STEP_33  = 1;
  ZOOM_STEP_50  = 2;
  ZOOM_STEP_67  = 3;
  ZOOM_STEP_75  = 4;
  ZOOM_STEP_90  = 5;
  ZOOM_STEP_100 = 6;
  ZOOM_STEP_110 = 7;
  ZOOM_STEP_125 = 8;
  ZOOM_STEP_150 = 9;
  ZOOM_STEP_175 = 10;
  ZOOM_STEP_200 = 11;
  ZOOM_STEP_250 = 12;
  ZOOM_STEP_300 = 13;
  ZOOM_STEP_400 = 14;
  ZOOM_STEP_500 = 15;
  ZOOM_STEP_UNK = 16;
  ZOOM_STEP_MIN = ZOOM_STEP_25;
  ZOOM_STEP_MAX = ZOOM_STEP_500;
  ZOOM_STEP_DEF = ZOOM_STEP_100;

  ZOOM_PCT_DELTA = 5;

  ZoomStepValues : array[ZOOM_STEP_MIN..ZOOM_STEP_MAX] of integer = (25, 33, 50, 67, 75, 90, 100, 110, 125, 150, 175, 200, 250, 300, 400, 500);

  URI_ABOUTBLANK = 'about:blank';

  {* Reserved IDs used in some JavaScript functions *}
  WEBVIEW4DELPHI_JS_FIRST_ID              = 10000;
  WEBVIEW4DELPHI_JS_RETRIEVEHTMLJOB_ID    = WEBVIEW4DELPHI_JS_FIRST_ID;
  WEBVIEW4DELPHI_JS_RETRIEVETEXTJOB_ID    = WEBVIEW4DELPHI_JS_FIRST_ID + 1;
  WEBVIEW4DELPHI_JS_LAST_ID               = WEBVIEW4DELPHI_JS_FIRST_ID + 100;

  {* Reserved IDs used in some DevTools functions *}
  WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID                       = 10000;
  WEBVIEW4DELPHI_DEVTOOLS_RETRIEVEMHTML_ID               = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID;
  WEBVIEW4DELPHI_DEVTOOLS_CLEARBROWSERCACHE_ID           = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 1;
  WEBVIEW4DELPHI_DEVTOOLS_CLEARDATAFORORIGIN_ID          = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 2;
  WEBVIEW4DELPHI_DEVTOOLS_EMULATENETWORKCONDITIONS_ID    = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 3;
  WEBVIEW4DELPHI_DEVTOOLS_SETIGNORECERTIFICATEERRORS_ID  = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 4;
  WEBVIEW4DELPHI_DEVTOOLS_SIMULATEKEYEVENT_ID            = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 5;
  WEBVIEW4DELPHI_DEVTOOLS_REFRESH_ID                     = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 6;
  WEBVIEW4DELPHI_DEVTOOLS_LAST_ID                        = WEBVIEW4DELPHI_DEVTOOLS_FIRST_ID + 100;

  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_1       = 1;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_2       = 2;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_4       = 4;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_6       = 6;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_9       = 9;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_16      = 16;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_DEFAULT = WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_1;
  WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_VALID   = [WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_1,
                                               WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_2,
                                               WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_4,
                                               WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_6,
                                               WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_9,
                                               WEBVIEW4DELPHI_PRINT_PAGESPERSIDE_16];

  WEBVIEW4DELPHI_PRINT_COPIES_DEFAULT = 1;

  WEBVIEW4DELPHI_INVALID_FRAMEID = 0;

  {$IF NOT DECLARED(HWND_MESSAGE)}
  HWND_MESSAGE = System.THandle(-3);
  {$IFEND}

  WV_URLS_URL       = 'edge://edge-urls';
  WV_FLAGS_URL      = 'edge://flags';
  WV_DOWNLOADS_URL  = 'edge://downloads';
  WV_EXTENSIONS_URL = 'edge://extensions';

implementation

end.
